/**
**************************************************************************************
*Palisma - Secrets of the Illuminati is an open-source 2D RPG                        *
*Copyright (C) 2006, Tony Sparks                                                     *
*                                                                                    *
*This library is free software; you can redistribute it and/or                       *
*modify it under the terms of the GNU Lesser General Public                          *
*License as published by the Free Software Foundation; either                        *
*version 2.1 of the License, or (at your option) any later version.                  *
*                                                                                    *
*This library is distributed in the hope that it will be useful,                     *
*but WITHOUT ANY WARRANTY; without even the implied warranty of                      *
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                   *
*Lesser General Public License for more details.                                     *
*                                                                                    *
*You should have received a copy of the GNU Lesser General Public                    *
*License along with this library; if not, write to the Free Software                 *
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA      *
**************************************************************************************
*/
#pragma once
#pragma warning( disable : 4244)
#include "ICamera.h"
#include "../mmanager.h"
#include "Image.h"
#include "../shared/color.h"
#include "../shared/vector.h"
#include <iostream>


/**
===================================
Graphics Backend interface
===================================
*/
class IRender
{
public:
    virtual int Init()=0;
	virtual void Shutdown()=0;

	virtual void DrawImage( Image *im, int x, int y)=0;
    virtual void DrawImage( Image *im, int x, int y, float width, float height)=0;
    virtual void DrawSubImage( Image *im, int x, int y, int row, int col)=0;

    virtual void DrawString( int x, int y, const char *s,...)=0;
	virtual void DrawRect( int x, int y, int w, int h )=0;
    virtual void DrawLine( const Vector2f &p1, const Vector2f &p2 )=0;
	virtual void FillRect( int x, int y, int w, int h )=0;
    virtual void DrawCircle( float radius, int x, int y)=0;
    virtual void FillCircle( float radius, int x, int y)=0;

    virtual int GetTextHeight(char)=0;
    virtual int GetTextWidth(char)=0;

	virtual void  SetColor( float r, float g, float b, float a=1)=0;
    virtual void  SetColor(Color c)=0;
    virtual Color GetColor()=0;
	virtual void  SetColorEffect( float r, float g, float b, float a=1)=0;
    virtual void  SetColorEffect(Color c)=0;
    virtual Color GetColorEffect()=0;

	virtual void PreRender()=0;
	virtual void PostRender()=0;


    virtual void EnableFog()=0;
    virtual void DisableFog()=0;
    virtual void SetFogDensity(float density)=0;
    virtual void ChangeFogColor(float r, float g, float b, float a=1)=0;
    virtual void ChangeFogColor(Color)=0;
    virtual Color GetFogColor()=0;


    virtual ICamera* GetCamera()=0;
    virtual void SetCamera( ICamera* c )=0;
    
};
